Configuring Manual Load Partitioning

About Manual Load Partitioning

Configuring the Workflow Service Configuration File

Assigning Tenants to the Workflow or Email Service

Viewing the Results of the Manual Load Partitioning

About Manual Load Partitioning

Use the Service Server workspace to configure the manual load partitioning feature. The manual load partitioning feature allows you to allocate the load between workflow or email service instances based on your knowledge of the tenant load and server capacity.  

If you do not use the manual load partitioning feature, the workflow or email service load balancing automatically balances the tenants among the participating workflow or email service instances. This guarantees that the tenants are balanced evenly among the servers.  However, this creates race conditions among the service instances when starting up and subscribing to events, which can lead to workflow or email subscription failure and deadlock issues.

When you start up the services, the workflow and email services retrieve the list of assigned tenants. The services only process the tasks for the assigned tenants. The system updates the list of assigned tenants in predefined time intervals. If the list of tenants is empty, the system falls back to the default behavior of processing all of the tenants.

Workflow Load Balancing Flowchart

Email Load Balancing Flowchart


Configuring the Workflow Service Configuration File

For the email service, all load partitioning is done manually.

For the workflow service, you can select either manual or automatic (default). To select manual load partitioning for the workflow service, do the following:

1.Navigate to the workflow binary folder and open the file called WorkflowApp.config with a text editor.

2.Find the key called EnableLoadPartitioning and set it to false.

3.Save the file.

Assigning Tenants to the Workflow or Email Service

When you configure workflow or email service servers, ensure that at least one server is defined as the "catch all" server.  A "catch all" server manages all of the live tenants, even if it does not have any tenants associated with it. Each host should have at least one "catch all" server.  This server processes workflow and email events for all tenants.

For each server, you must enable either the email service, the workflow service, or both. If you do not enable a service on the server but the service is running, the service gets an empty tenant list and it runs as a "catch all" server.

If a service instance crashes or stops, the system deletes the partition details from the database and no other instance will pick these tenants except for the "catch all" server.

1.Log in to the ConfigDB.

2.From the workspace selector bar, click More....

3.Select Service Server. The system displays the Service Server workspace.

4.Click New Service Server.

5.Enter the host name in the Host Name field.

6.If the email service will run on this server, check Is Email Service Enabled.

7.If the workflow service will run on this server, check Is Workflow Service Enabled.

8.If the server is a catch all server, check Is Catch All.

9.If the server is not a catch all server, do the following:

a. Click the Tenants tab.
b. Click Link.
c. Highlight a tenant from the list and click Select.

10.Click Save.

Viewing the Results of the Manual Load Partitioning

You can view the results of the manual load partitioning in one of two ways:

Setting the Log Level for the Workflow or Email Service

To configure the logs, do the following:

1.Log in to the ConfigDB.

2.Open the Logging Configuration workspace.

3.Open the WorkflowService service.

4.Change the value of the Log Level field to INFO.

5.Open the EmailService service.

6.Change the value of the Log Level field to INFO.

7.Click Save.

Viewing the Workflow or Email Manual Load Partitioning

After you configure the logs, to view the results, do the following:

1.Log into the ConfigDB.

2.Open the Logs workspace.

3.Use a saved search to show all logs with a service name of WorkflowService or a service name of EmailService.

Logs Saved Search

4.Verify that the tenants listed under the current assigned tenant list match the linked tenants for this server.

Viewing a Report of the Manual Load Partitioning

The workflow or email service retrieves the assigned tenants and updates the Frs_ops_workflow_heart_beat and Frs_ops_workflow_partition tables in the ConfigDB.

Before you begin, start the workflow or email service. Keep the current session.

Run the following query in Microsoft SQL on the ConfigDB to see the details of the services that are assigned to each tenant:

SELECT ServiceType, HostName, InstanceNumber, TenantId

FROM Frs_ops_workflow_heart_beat heartbeat

JOIN Frs_ops_workflow_partition partition

ON heartbeat.ServiceId = partition.ServiceId

The following is an example of the partitioning details:

Service Type Host Name Instance Number Tenant ID
Workflow Engine CA-L02552 1

ConfigDB, ITSM_7_Daily_Build

Email Engine CA-L02552 1

ConfigDB, ITSM_7_Daily_Build